Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self-destructing server returns 500 instead of 410 to activitypub requests #30348

Open
Johann150 opened this issue May 17, 2024 · 1 comment
Open
Labels
bug Something isn't working status/to triage This issue needs to be triaged

Comments

@Johann150
Copy link

Steps to reproduce the problem

  1. open self-destruct-instance.example in web browser and see that it displays the message "This server is closing down" etc.
  2. curl -vvv 'https://self-destruct-instance.example/users/someone' shows that the page returns status 410
  3. curl -H 'accept: application/activity+json' -vvv 'https://self-destruct-instance.example/users/someone' shows that the page returns status 500

NB: The actual request for step 3 was slightly different, e.g. it additionally had a HTTP signature. This does not seem to change the outcome, so I take this as a minimum (non)working example.

Expected behaviour

returns status 410 to indicate that the user and instance are gone

Actual behaviour

returns status 500, indistinguishable from a temporarily malfunctioning server

Detailed description

No response

Mastodon instance

social.dev-wiki.de

Mastodon version

not able to determine

Technical details

The returned status 500 leads to my Activitypub implementation re-trying to process the activity several times. If a client error status code (4XX) was returned, processing the activity could correctly be scrapped immediately.

The error occurs on a Delete activity of an actor that my instance already deleted or otherwise didn't know and was thus first trying to fetch the keys to verify the signature. In trying to fetch the key, the request from the steps for reproducing was made.

@Johann150 Johann150 added bug Something isn't working status/to triage This issue needs to be triaged labels May 17, 2024
@ClearlyClaire
Copy link
Contributor

I am able to reproduce this issue by querying this particular server, but I am unable to do so on a test environment.

In my test environment, querying anything with Accept: application/activity+json returns a 410 Gone as expected.

I am not sure what could be going wrong on that particular server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status/to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants